//用户接口
import request from '@/utils/request'
import { loginForm, loginResponseData } from './type'
//统一管理接口
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
  LOGOUT_URL = "/user/logout"
}
//登录
export const reqLogin = (data: loginForm) => request.post<any, loginResponseData>(API.LOGIN_URL, data)
//登录返回数据
export const reqInfo = () => request.get<any, any>(API.USERINFO_URL)
//退出登录
export const reqlogout = ()=> request.post<any,any>(API.LOGOUT_URL)